package cn.hou.java.designpattern._07observerself;

public class Worker implements Person {
	private String name;
	public Worker(String name) {
		this.name = name;
	}
	@Override
	public void todoByWether(String wether) {
		if(wether.equals("晴天")){
			System.out.println(name+"高高兴兴去上班");
		}else if(wether.equals("雨天")){
			System.out.println(name+"打着雨伞去上班");
		}else{
			System.out.println(name+"戴着口罩去上班");
		}
	}
}
